package org.tigris.mappedlexer.validator.implementation;

import org.tigris.mappedlexer.validator.Validator;

/**
 * Default support to methods, which throws UnsupportedOperationException.
 * 
 * @author zhisen.huang
 *
 */
public abstract class AbstractValidator implements Validator {

	/**
	 * Get the next token with the constraints.
	 * 
	 * @param validators the constraints
	 */
	public AbstractValidator() {

	}

	/**
	 * Get the next token with the constraints.
	 * 
	 * @param validators the constraints
	 */
	public boolean validate(char chr) throws UnsupportedOperationException {
		throw new UnsupportedOperationException();
	}

	/**
	 * Get the next token with the constraints.
	 * 
	 * @param validators the constraints
	 */
	public boolean validate(String str) throws UnsupportedOperationException {
		throw new UnsupportedOperationException();
	}

	/**
	 * Get the next token with the constraints.
	 * 
	 * @param validators the constraints
	 */
	public boolean validate(double number) throws UnsupportedOperationException {
		throw new UnsupportedOperationException();
	}

	@Override
	public String toString() {
		return this.getClass().getName();
	}

}
